/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ahmed
 */
@Embeddable
public class CommanderPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_F")
    private BigDecimal idF;
    @Basic(optional = false)
    @Column(name = "ID_ITEM")
    private BigDecimal idItem;

    public CommanderPK() {
    }

    public CommanderPK(BigDecimal idF, BigDecimal idItem) {
        this.idF = idF;
        this.idItem = idItem;
    }

    public BigDecimal getIdF() {
        return idF;
    }

    public void setIdF(BigDecimal idF) {
        this.idF = idF;
    }

    public BigDecimal getIdItem() {
        return idItem;
    }

    public void setIdItem(BigDecimal idItem) {
        this.idItem = idItem;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idF != null ? idF.hashCode() : 0);
        hash += (idItem != null ? idItem.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CommanderPK)) {
            return false;
        }
        CommanderPK other = (CommanderPK) object;
        if ((this.idF == null && other.idF != null) || (this.idF != null && !this.idF.equals(other.idF))) {
            return false;
        }
        if ((this.idItem == null && other.idItem != null) || (this.idItem != null && !this.idItem.equals(other.idItem))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "MODEL.CommanderPK[ idF=" + idF + ", idItem=" + idItem + " ]";
    }
    
}
